project(widgetpp)

cmake_minimum_required(VERSION 2.8)

set(HEADERS
	widgetpp/Wdg.hpp
	widgetpp/Wdg2DAxis.hpp
	widgetpp/Wdg2DPlot.hpp
	widgetpp/Wdg3DPlot.hpp
	widgetpp/WdgButton.hpp
	widgetpp/WdgCheckBox.hpp
	widgetpp/WdgCheckButton.hpp
	widgetpp/WdgColors.hpp
	widgetpp/WdgContainer.hpp
	widgetpp/WdgDialogs.hpp
	widgetpp/WdgDList.hpp
	widgetpp/WdgDraw.hpp
	widgetpp/WdgElementaryPlotRoutines.hpp
	widgetpp/WdgLabel.hpp
	widgetpp/WdgOK.hpp
   widgetpp/WdgPlottingCurves.hpp
	widgetpp/WdgProgressBar.hpp
	widgetpp/WdgQuit.hpp
	widgetpp/WdgScale.hpp
	widgetpp/WdgShading.hpp
	widgetpp/WdgText.hpp  
   widgetpp/WdgTitle.hpp                                                            
	widgetpp/Widgetpps.hpp
	widgetpp/widgetpp.hpp
)
     
set(SOURCES
	src/Wdg.cpp
   src/Wdg2DAxis.cpp
	src/Wdg2DPlot.cpp
	src/Wdg3DPlot.cpp
	src/WdgButton.cpp
	src/WdgCheckBox.cpp
	src/WdgCheckButton.cpp
	src/WdgColors.cpp
	src/WdgContainer.cpp
	src/WdgDList.cpp
	src/WdgDialogs.cpp
	src/WdgDraw.cpp
	src/WdgElementaryPlotRoutines.cpp
   src/WdgPlottingCurves.cpp
	src/WdgLabel.cpp
	src/WdgOK.cpp
	src/WdgProgressBar.cpp
	src/WdgQuit.cpp
	src/WdgScale.cpp
	src/WdgShading.cpp
	src/WdgText.cpp  
   src/WdgTitle.cpp    
	src/widgetpp.cpp
)
     
source_group("Header Files" FILES
	${HEADERS}
)
source_group("Source Files" FILES
	${SOURCES}
)

if (NOT "$ENV{DISLIN_ROOT}" STREQUAL "")
	set(Dislin_DIR $ENV{DISLIN_ROOT})
elseif (NOT "$ENV{DISLINROOT}" STREQUAL "")
	set(Dislin_DIR $ENV{DISLINROOT})
endif()
set(Dislin_LIBRARY ${Dislin_DIR}/disvcd.lib)

set(Boost_USE_STATIC_LIBS        ON)
set(Boost_USE_MULTITHREADED      ON)
set(Boost_USE_STATIC_RUNTIME    OFF)
find_package( Boost 1.48.0 COMPONENTS thread )

if(Boost_FOUND)
	include_directories(${Boost_INCLUDE_DIRS})
	include_directories(${Dislin_DIR})
	include_directories(${widgetpp_SOURCE_DIR}/widgetpp)
	add_library(widgetpp ${SOURCES} ${HEADERS})
	
	add_subdirectory(test)
	add_subdirectory(examples)
endif()

